<?php

/**
 * TauxProcess.php
 */

namespace RHX\Model\Object;

use Zend\Db\Adapter\Adapter;

/**
 * Classe TauxProcess
 */
class TauxProcess{

    public $id;
    public $poste_code;
    public $taux;
    public $nouveau_taux;
    public $date_application;
    public $is_applied;
    
    protected $adapter;
    /**
     * Constructeur
     *
     * @param array $data
     */
    public function __construct(Adapter $adapter, $data = array()) {
        $this->adapter = $adapter;
	$this->exchangeArray($data);
    }

    /**
     * Remplissage des données
     *
     * @param array $data
     */
    public function exchangeArray($data) {
	$this->id	 = isset($data['id']) ? $data['id'] : 0;
        $this->poste_code	 = isset($data['poste_code']) ? $data['poste_code'] : 0;
	$this->taux	 = isset($data['taux']) ? $data['taux'] : 0;
	$this->nouveau_taux	 = isset($data['nouveau_taux']) ? $data['nouveau_taux'] : 0;
	$this->date_application	 = isset($data['date_application']) ? $data['date_application'] : '0000-00-00';
        $this->is_applied = isset($data['is_applied']) ? $data['is_applied'] : false;
    }

    /**
     * Copie en Tableau des données
     * 
     * @return array
     */
    public function getArrayCopy() {
	return get_object_vars($this);
    }
}

?>
